package com.winning.yanghao.designpattern.singleton.lazy;

/**
 * 懒汉模式：线程安全，懒加载，性能较差
 */
public class LazyTwo {

    private LazyTwo(){}

    private static LazyTwo lazy = null;

    private synchronized static LazyTwo getInstance(){
        if(lazy == null){
            lazy = new LazyTwo();
        }
        return lazy;
    }

}
